package com.itheima.juc23.question3;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author li
 * 同时开启两个线程，共同获取1-100之前的所有数字
 * 要求：将输出所有的奇数
 */
public class Test {
    public static void main(String[] args) {
        MyRunnable runnable = new MyRunnable(new AtomicInteger(1), 100);
        Thread t1 = new Thread(runnable, "t1");
        Thread t2 = new Thread(runnable, "t2");
        t1.start();
        t2.start();
    }
}
